import http from '@/request/index'

export const getUserPage = (type: number) => {
    let pageSize = 25;
    let pageIndex = 1;
    let sex = 2;
    let isReal = 0;
    if(type == 1){
        pageIndex = 1;
        pageSize = 25;
        sex = 2;
        isReal = 0;
    }else if(type == 2){
        pageIndex = 2;
        pageSize = 25;
        sex = 2;
        isReal = 0;
    }else if(type == 3){
        pageIndex = 3;
        pageSize = 25;
        sex = 2;
        isReal = 0;
    }else if(type == 4){
        pageIndex = 4;
        pageSize = 25;
        sex = 2;
        isReal = 0;
    }else if(type == 5){
        pageIndex = 1;
        pageSize = 25;
        sex = 2;
        isReal = 2;
    }else if(type == 6){
        pageIndex = 2;
        pageSize = 25;
        sex = 2;
        isReal = 2;
    }else if(type == 7){
        pageIndex = 3;
        pageSize = 25;
        sex = 2;
        isReal = 2;
    }else if(type == 8){
        pageIndex = 4;
        pageSize = 25;
        sex = 2;
        isReal = 2;
    }else if(type == 9){
        pageIndex = 1;
        pageSize = 50;
        sex = 1;
        isReal = 0;
    }else if(type == 10){
        pageIndex = 1;
        pageSize = 50;
        sex = 1;
        isReal = 2;
    }
    //isReal: 0.会员；2.非会员
    return http.get('/app/user/getUnReadUserPage?pageSize='+pageSize+'&pageIndex='+pageIndex+'&sex='+sex+'&isReal='+isReal)
}

export const getUserListByTxcode = (txcodes) => {
    return http.get('/app/user/getUserListByTxcodes?txcodes='+txcodes);
}

export const getUser = (txcode) => {
    return http.post('/app/user/getUserInfo', {tengxuncode: txcode, keys: '1e55dbf412cb74d5e2c21fb6452408c7'});
}
